<template>
	<div class="wrapper" v-if="businessId" v-loading="loading">
		<el-steps :active="active" finish-status="success" align-center>
			<el-step title="保单录入"></el-step>
			<el-step title="信息确认"></el-step>
			<el-step title="保单支付"></el-step>
			<el-step title="完成投保"></el-step>
		</el-steps>

		<div v-if="active === 1"></div>
	</div>
</template>

<script>
import {
	productDetail,
	createBusiness,
	customerList,
	customerById,
	uploadFile,
	sendSMSCode,
	saveInsure,
	queryTargetByType,
	querySubjectData,
	importPerson,
	downloadExcel,
	saveQixian,
	savePerson,
	save,
	getBusinessById
} from '@/api'
import { downloadByResponse } from '@/utils/download'
import * as REGEXP from '@/const/REGEXP'
import _ from 'lodash'
import DocPreview from './components/docPreview.vue'
import SignatureElec from './components/signature-elec.vue'
import SignatureManu from './components/signature-manu.vue'
const baoform = {
	customerName: '',
	certNum: '', // 统一代码
	address: '', // 详细地址
	contactName: '', // 联系人
	contactPhone: '', // 手机号
	businessLicense: '', // 营业执照
	code: '' // 验证码
}
export default {
	data() {
		return {
			// 预判文档
			docUrl: '',

			loading: false, // 整体保存加载
			codeLoading: false // 验证码加载
		}
	},
	watch: {
		sameAsToubao: {
			handler(same) {
				if (same) {
					this.beibaoForm = Object.assign({}, this.toubaoForm)
				}
			},
			immediate: false
		}
	},
	computed: {
		productId() {
			return this.$route.query.productId
		}
	},

	async created() {},
	methods: {
		beforeAvatarUpload(file) {
			// const isJPG = file.type === 'image/jpeg'
			const isLt2M = file.size / 1024 / 1024 < 2

			if (!isLt2M) {
				this.$message.error('上传头像图片大小不能超过 2MB!')
			}
			return isLt2M
		}
	}
}
</script>

<style lang="scss" scoped="scoped">
.wrapper {
	padding: 20px;
}
.box-card {
	margin-bottom: 20px;
}
.product-name {
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	margin-block: 20px;
}
.import ::v-deep {
	.el-form {
		display: grid;
		gap: 15px;
		grid-template-columns: 1fr 1fr;
	}
	.el-form-item {
		margin-bottom: 0;
	}

	.el-table__header tr th {
		font-size: 13px;
		color: #333;
		background: #fbfcff;
	}
}
.field {
	width: 100%;
}
.hide-upload-button ::v-deep .el-upload--picture-card {
	display: none;
}

.insure-confirm {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	text-align: center;
	padding: 15px;
	z-index: 999;
	background-color: rgba(0, 0, 0, 0.13);
}
</style>
